CFLAG = -I ./include -g
CC = gcc
OBJ = managerMain producerMain consumerMain

all: $(OBJ)

managerMain: managerMain.o ipc.o
	$(CC) managerMain.o ipc.o -o managerMain

producerMain: producerMain.o ipc.o
	$(CC) producerMain.o ipc.o -o producerMain

consumerMain: consumerMain.o ipc.o
	$(CC) consumerMain.o ipc.o -o consumerMain

managerMain.o: managerMain.c 
	$(CC) -c managerMain.c $(CFLAG) -o managerMain.o

producerMain.o: producerMain.c
	$(CC) -c producerMain.c $(CFLAG) -o producerMain.o

consumerMain.o: consumerMain.c 
	$(CC) -c consumerMain.c $(CFLAG) -o consumerMain.o

ipc.o: ipc.c 
	$(CC) -c ipc.c $(CFLAG) -o ipc.o

clean:
	rm -rf *.o $(OBJ)